<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	template="/layout/page/sample/left-right-template.xhtml">

	<ui:param name="compId" value="#{commonContentViewBean.id}" />
	<ui:param name="treeViewBean"
		value="#{commonContentViewBean.allView[0]}" />
	<ui:param name="compLeftTitle" value="组织机构管理" />

	<ui:param name="userTabName" value="用户" />
	<ui:param name="orgTabName" value="机构" />
	<ui:param name="cachetName" value="公章" />
	<ui:param name="topTitle" value="查询" />

	<ui:define name="compLeft">
		<h:form id="#{compId}_from">
			<p:toolbar>
				<p:toolbarGroup align="left">
					<p:commandButton
						onstart="btnAction('#{commonContentViewBean.id}','v3.manage.org.orgLayout.add','550','430','icons/cog_add.png','add','org-manage-scene','org-add');"
						title="添加新组织机构" image="ui-icon-disk" value="添加">

					</p:commandButton>
					<p:commandButton actionListener="#{orgManage.orgDelAction}"
						onstart="if(confirm('确认要删除组织机构吗？')){return true;}else{return false;}"
						title="删除组织机构" image="ui-icon-trash" value="删除"
						update="#{compId}_from:#{commonContentViewBean.id}_tree,#{treeViewBean.id}_org_form">
						<h:inputHidden value="#{treeViewBean.id}" />
					</p:commandButton>
					
				</p:toolbarGroup>
			</p:toolbar>


			<ui:decorate
				template="/layout/iteration/tree/sino-tree-single-template.xhtml">
				<ui:param name="compViewBean" value="#{treeViewBean}" />
				<ui:param name="compId" value="#{commonContentViewBean.id}_tree" />
				<ui:param name="compSelectedNodeUpdate"
					value="#{commonContentViewBean.id}_rightMain" />
			</ui:decorate>

		</h:form>

	</ui:define>

	<ui:define name="compRight">
		<p:tabView id="#{commonContentViewBean.id}_rightMain" style="border:0 none;" dynamic="true"
			cache="true">
			<p:tab title="#{userTabName}" closable="false">
				<div style="width: 100%; height: 100%; overflow: auto;"><ui:include
					src="/includes/model/manage/org/userLayout.xhtml" /></div>
			</p:tab>
			<p:tab title="#{orgTabName}" closable="false">
				<div style="width: 100%; height: 100%; overflow: auto;"><ui:include
					src="/includes/model/manage/org/viewOrg.xhtml" /></div>
			</p:tab>
			<p:tab title="#{cachetName}" closable="false">
				<div style="width: 100%; height: 95%; overflow: auto;">
					<ui:include
						src="/includes/model/manage/org/cachetLayout.xhtml" />
				</div>
			</p:tab>
		</p:tabView>
	</ui:define>
</ui:composition>
